package com.yw.unlimitedproxy.model;

import com.yw.unlimitedproxy.R;
import com.yw.unlimitedproxy.utils.Utils;

import java.util.ArrayList;

public class Server {
    private String country;
    private String flagUrl;
    private String ovpn;
    private String ovpnUserName;
    private String ovpnUserPassword;


    public Server() {
    }

    public Server(String country, String flagUrl, String ovpn) {
        this.country = country;
        this.flagUrl = flagUrl;
        this.ovpn = ovpn;
    }

    public Server(String country, String flagUrl, String ovpn, String ovpnUserName, String ovpnUserPassword) {
        this.country = country;
        this.flagUrl = flagUrl;
        this.ovpn = ovpn;
        this.ovpnUserName = ovpnUserName;
        this.ovpnUserPassword = ovpnUserPassword;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getFlagUrl() {
        return flagUrl;
    }

    public void setFlagUrl(String flagUrl) {
        this.flagUrl = flagUrl;
    }

    public String getOvpn() {
        return ovpn;
    }

    public void setOvpn(String ovpn) {
        this.ovpn = ovpn;
    }

    public String getOvpnUserName() {
        return ovpnUserName;
    }

    public void setOvpnUserName(String ovpnUserName) {
        this.ovpnUserName = ovpnUserName;
    }

    public String getOvpnUserPassword() {
        return ovpnUserPassword;
    }

    public void setOvpnUserPassword(String ovpnUserPassword) {
        this.ovpnUserPassword = ovpnUserPassword;
    }

    /**
     * Generate server array list
     */
    public static ArrayList<Server> getServerList() {

        ArrayList<Server> servers = new ArrayList<>();

        servers.add(new Server("test",
                Utils.getImgURL(R.mipmap.united_flag_icon),
                "test.ovpn",
                "",
                ""
        ));

        servers.add(new Server("United States",
                Utils.getImgURL(R.mipmap.united_flag_icon),
                "us.ovpn",
                "freeopenvpn",
                "416248023"
        ));
        servers.add(new Server("Japan",
                Utils.getImgURL(R.mipmap.united_flag_icon),
                "japan.ovpn",
                "vpn",
                "vpn"
        ));
        servers.add(new Server("Sweden",
                Utils.getImgURL(R.mipmap.united_flag_icon),
                "sweden.ovpn",
                "vpn",
                "vpn"
        ));
        servers.add(new Server("Korea",
                Utils.getImgURL(R.mipmap.united_flag_icon),
                "korea.ovpn",
                "vpn",
                "vpn"
        ));

        return servers;
    }
}
